package com.hellobike.haxing.modules.wms.facade;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hellobike.haxing.modules.wms.dto.DeliveryOrderHeaderDto;
import com.hellobike.haxing.modules.wms.dto.PickTaskDto;
import com.hellobike.haxing.modules.wms.entity.DeliveryOrderDetail;
import com.hellobike.haxing.modules.wms.entity.DeliveryOrderHeader;
import com.hellobike.haxing.modules.wms.entity.PickTask;
import com.hellobike.haxing.modules.wms.exception.WmsServiceException;

import java.util.List;

public interface WmsDeliveryFacade {


    DeliveryOrderHeader createDeliveryOrder(DeliveryOrderHeader header, List<DeliveryOrderDetail> details, Long warehouseId, Integer userId) throws WmsServiceException;

    void createWave(List<Long> deliveryHeaderIds, Long warehouseId, Integer userId) throws WmsServiceException;

    void batchCreateWavePickTask(List<Long> waveIds, Long warehouseId, Integer userId) throws WmsServiceException;

    void createWavePickTask(Long waveId, Long warehouseId, Integer userId) throws WmsServiceException;

    void batchCreateDOPickTask(List<Long> deliveryHeaderIds, Long warehouseId, Integer userId) throws WmsServiceException;

    void createDOPickTask(Long deliveryHeaderId, Long warehouseId, Integer userId) throws WmsServiceException;


    void pickWavePickTask(List<PickTask> tasks, Long pickHeaderId, String opName, Long warehouseId, Integer userId) throws WmsServiceException;


    void pickDOPickTask(List<PickTaskDto> tasks, List<String> pointCodes, Long pickHeaderId, String opName, Long warehouseId, Integer userId) throws WmsServiceException;

    List<PickTaskDto> queryPickTask(Long pickHeaderId) throws WmsServiceException;

    IPage<DeliveryOrderHeaderDto> wrapperPickInfo(IPage<DeliveryOrderHeader> pageList);

    void freeContainer(Long containerId, Long warehouseId, Integer sysUserId) throws WmsServiceException;
}
